package com.burstly.lib.util.calendar;

import com.burstly.lib.util.LoggerExt;
import com.burstly.lib.util.Utils;

class CalendarEventValidator
{
  private static final LoggerExt LOG = LoggerExt.getInstance();
  private static final String TAG = CalendarEventValidator.class.getSimpleName();

  static void validateCalendarEvent(CalendarEvent paramCalendarEvent)
    throws Exception
  {
    Utils.checkNotNull(paramCalendarEvent, "Event can not be null");
    Utils.checkNotNull(paramCalendarEvent.start, "Event's start date can not be null");
    Utils.checkNotNull(paramCalendarEvent.end, "Event's end date can not be null");
    Utils.checkNotNull(paramCalendarEvent.description, "Event's description can not be null");
    if ((paramCalendarEvent.reminder != null) && (!paramCalendarEvent.reminder.startsWith("-")))
    {
      LOG.logWarning(TAG, "Specific remind date is not supported. Use negative form (for ex. -3600000) to notify an hour before the event.", new Object[0]);
      paramCalendarEvent.reminder = null;
    }
    if (paramCalendarEvent.recurrence == null)
      Utils.checkNotNull(paramCalendarEvent.end, "End date must be set for non-recurring events.");
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.util.calendar.CalendarEventValidator
 * JD-Core Version:    0.6.2
 */